import Vue from 'vue'
import VueRouter from 'vue-router'

import login from '../views/login/index.vue'
import home from '../views/home/index.vue'
import question from '../views/question/index.vue'
import movie from '../views/movie/index.vue'
import my from '../views/my/index.vue'
import notfound from '../views/notfound/index.vue'
Vue.use(VueRouter)

const routes = [
  {
    path: '/login',
    component: login
  },
  {
    path: '/home',
    component: home,
    meta: {
      showTap: true
    }
  },
  {
    path: '/question',
    component: question,
    meta: {
      showTap: true
    }
  },
  {
    path: '/movie',
    component: movie,
    meta: {
      showTap: true
    }
  },
  {
    path: '/my',
    component: my,
    meta: {
      showTap: true
    }
  },
  {
    path: '/notfound',
    component: notfound
  },
  {
    path: '/',
    redirect: '/home'
  },
  {
    path: '*',
    redirect: '/notfound'
  }
]
const router = new VueRouter({
  routes
})

export default router
